package com.neeraj.SharingArtifacts;
import android.location.Location;


/**
 * LocationInfo is a container object designed to be populated by the collector.
 * This object contains information about the device's location, and the accuracy of that information
 */
public class LocationInfo {
	public static double latitude;
	public static double longitude;
	public static double altitude;
	public static long utcTime;
	public static boolean hasValues=false;
	
	
	/**
	 * Function used to populate the object with information about a GPS location
	 * @param loc Android Location object containing GPS fix info
	 */
	public static void populate(Location loc){
		latitude=loc.getLatitude();
		longitude=loc.getLongitude();
		altitude=loc.getAltitude();
		utcTime=loc.getTime();
		hasValues=true;
	}
	
	/**
	 * Function to blank out the object. Used to reset data between collections
	 */
	public static void clear(){
		latitude=-1;
		longitude=-1;
		altitude=-1;
		utcTime=-1;
		hasValues=false;
	}
}
